ExpanderRow

A [class@Gtk.ListBoxRow] used to reveal widgets.

<picture> <source srcset="expander-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="expander-row.png" alt="expander-row"> </picture>

The AdwExpanderRow widget allows the user to reveal or hide widgets below it. It also allows the user to enable the expansion of the row, allowing to disable all that the row contains.

AdwExpanderRow as GtkBuildable

The AdwExpanderRow implementation of the [iface@Gtk.Buildable] interface supports adding a child as an action widget by specifying “action” as the “type” attribute of a <child> element.

It also supports adding it as a prefix widget by specifying “prefix” as the “type” attribute of a <child> element.

CSS nodes

AdwExpanderRow has a main CSS node with name row and the .expander style class. It has the .empty style class when it contains no children.

It contains the subnodes row.header for its main embedded row, list.nested for the list it can expand, and image.expander-row-arrow for its arrow.

Constructors

this
this(AdwExpanderRow* adwExpanderRow, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new AdwExpanderRow.

Members

Functions

addAction
void addAction(Widget widget)

Adds an action widget to @self.

addPrefix
void addPrefix(Widget widget)

Adds a prefix widget to @self.

addRow
void addRow(Widget child)

Adds a widget to @self.

getEnableExpansion
bool getEnableExpansion()

Gets whether the expansion of @self is enabled.

getExpanded
bool getExpanded()

Gets whether @self is expanded.

getExpanderRowStruct
AdwExpanderRow* getExpanderRowStruct(bool transferOwnership)

Get the main Gtk struct

getIconName
string getIconName()

Gets the icon name for @self.

getShowEnableSwitch
bool getShowEnableSwitch()

Gets whether the switch enabling the expansion of @self is visible.

getStruct
void* getStruct()

the main Gtk struct as a void*

getSubtitle
string getSubtitle()

Gets the subtitle for @self.

remove
void remove(Widget child)
setEnableExpansion
void setEnableExpansion(bool enableExpansion)

Sets whether the expansion of @self is enabled.

setExpanded
void setExpanded(bool expanded)

Sets whether @self is expanded.

setIconName
void setIconName(string iconName)

Sets the icon name for @self.

setShowEnableSwitch
void setShowEnableSwitch(bool showEnableSwitch)

Sets whether the switch enabling the expansion of @self is visible.

setSubtitle
void setSubtitle(string subtitle)

Sets the subtitle for @self.

Static functions

getType
GType getType()

Variables

adwExpanderRow
AdwExpanderRow* adwExpanderRow;

the main Gtk struct

Inherited Members

From PreferencesRow

adwPreferencesRow
AdwPreferencesRow* adwPreferencesRow;

the main Gtk struct

getPreferencesRowStruct
AdwPreferencesRow* getPreferencesRowStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getTitle
string getTitle()

Gets the title of the preference represented by @self.

getTitleSelectable
bool getTitleSelectable()

Gets whether the user can copy the title from the label

getUseUnderline
bool getUseUnderline()

Gets whether an embedded underline in the title indicates a mnemonic.

setTitle
void setTitle(string title)

Sets the title of the preference represented by @self.

setTitleSelectable
void setTitleSelectable(bool titleSelectable)

Sets whether the user can copy the title from the label

setUseUnderline
void setUseUnderline(bool useUnderline)

Sets whether an embedded underline in the title indicates a mnemonic.

Meta